package cn.codenest.rabbitmqbootpublisher.controller;

import cn.codenest.rabbitmqbootpublisher.util.RbmqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：Hyman
 * @date ：Created in 2021/7/21 11:17
 * @description：
 * @modified By：
 * @version: $
 */
@RestController
public class RbmqController {

    @Autowired
    RbmqService rbmqService;

    @GetMapping("/rbmq/msg")
    public String publish() {
        rbmqService.sendMsg("Hello World");
        return "ok";
    }
}
